package com.neusoft.bizcore.activiti.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.neusoft.bizcore.activiti.dto.ProcessInstanceDTO;
import com.neusoft.bizcore.activiti.dto.WorkorderDTO;
import com.neusoft.bizcore.activiti.enums.WorkOrderStatus;
import com.neusoft.bizcore.auth.common.bean.UserBean;
import com.neusoft.bizcore.web.support.Searchable;

public interface WorkOrderService {

    Page<WorkorderDTO> todoWorkSearch(Pageable pageable, Searchable searchable, UserBean user);

    long countTodoWorkSearch(Searchable searchable, UserBean user);

    Page<WorkorderDTO> doneWorkSearch(Pageable pageable, Searchable searchable, UserBean user);

    long countDoneWorkSearch(Searchable searchable, UserBean user);

    Page<WorkorderDTO> myWorkSearch(Pageable pageable, Searchable searchable, UserBean user);

    long countMeWorkSearch(Searchable searchable, UserBean user);

    WorkorderDTO details(String workorderNum);

    void revoke(String workorderNum, UserBean user);

    void delete(String workorderNum);

    String getInstanceIdByWorkorderNum(String workorderNum);

    String getWorkorderNumByInstanceId(String instanceId);

    String temporaryStorage(String title, String type, String workorderNum, UserBean user);

    ProcessInstanceDTO submit(String title, String type, String workorderNum, UserBean user);

    void updateStatus(String workorderNum, WorkOrderStatus status);

    void updateTime(String workorderNum);
}
